<?php
require_once 'Base.php';
class Sb_Init extends Sb_Base
{
	function loadClass($className)
	{
		if($className)
		{
			$classNameArr = explode('_', $className);
			$pathToClass = '';
			foreach ($classNameArr as $partPath)
			{
				if($pathToClass)
					$pathToClass .= DIRECTORY_SEPARATOR;
				$pathToClass .= $partPath;
			}
			if($pathToClass)
				require_once $pathToClass.'.php';
		}
	}
	
	function isDebug()
	{
		return (bool)(isset($_SERVER['REMOTE_ADDR']) && '85.65.72.138' == $_SERVER['REMOTE_ADDR']);
	}
	
	function debug($debug)
	{
		if(Sb_Init::isDebug())
			var_dump($debug);
	}
}